<?php
class Page extends Controller{
    
	function Page(){
		parent::Controller();	
	}		
    
    function index($page_name){
        $this->load->model('Pages_model', null, true);
        $this->load->model('Articles_model', null, true);
        
        $data['page'] = $this->Pages_model->getPage($page_name);
        $data['articles'] = $this->Articles_model->getHotNewsHome(); 
		// meta 
        $data['meta'] = array(
            		array('name'=>'description', 'content'=>$data['page']['PageTitle']),
            		array('name'=>'keywords', 'content'=>strip_tags($data['page']['PageTitle']))
            );
        $data['Title'] = $data['page']['PageTitle'];
        
        $this->load->view('page/index', $data);
    }    
}